from base import Base
from selenium.webdriver.common.by import By
from time import sleep


# 定义页面类，继承基类
class BeiJingPage(Base):

    beijing = (By.XPATH, '//android.widget.TextView[@text="北京"]')

    dy = (By.XPATH, '//android.widget.TextView[@text="切换地区"]')

    def beijingyewu(self):
        # 定位北京，并点击
        self.find_ele(self.beijing).click()
        sleep(3)
